package com.yanqu.road.entity.activity.sonhai.enums;

public enum SonHaiBattleLogTypeEnum {
    EGG(0, "蛋蛋易主"),
    PVP(1, "PVP击败对方"),
    PVE(2, "镇伏高级兽群"),
    ;

    /**
     * 类型
     */
    private int type;

    /**
     * 名称
     */
    private String name;

    SonHaiBattleLogTypeEnum(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    /**
     * 获取战斗日志类型
     * @param eventType
     * @return
     */
    public static int getBattleTypeByEventType(int eventType) {
        if (eventType == SonHaiPlotTypeEnum.PLOT_TYPE_2.getType()) {
            return SonHaiBattleLogTypeEnum.PVE.getType();
        }
        if (eventType == SonHaiPlotTypeEnum.PLOT_TYPE_13.getType()) {
            return SonHaiBattleLogTypeEnum.EGG.getType();
        }
        if (eventType == SonHaiPlotTypeEnum.PLOT_TYPE_14.getType()) {
            return SonHaiBattleLogTypeEnum.PVP.getType();
        }
        return 0;
    }
}
